<?php
/**
* This file holds a class for Application_Model_User.
* @package busmap
*/

/**
* This class holds Application_Model_User class, that manipulates with User objects.
* @package busmap
*/
class Application_Model_User
{
    protected $_username;
    protected $_password;
    protected $_fullname;
    protected $_level;
    protected $_email;
    protected $_addTime;
	protected $_deleteTime;

    protected $_id;
  
	/**
	* Constructor with optional options array.
	*/
    public function __construct(array $options = null)
    {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
 
	/**
	* Universal setter function that gets a name and a value for the User object property.
	*/
    public function __set($name, $value){
        $method = 'set' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid User property');
        }
        $this->$method($value);
    }
	/**
	* Universal getter function that gets the value of a User property with the given name.
	*/
    public function __get($name){
	       $method = 'get' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid User property');
        }
        return $this->$method();
	}
  
 	/**
	* Setter function for the username property.
	*/
    public function setUsername($username){
		$this->_username = $username;
		return $this;
	}
	/**
	* Getter function for the username property.
	*/
    public function getUsername(){
		return $this->_username;
	}
 
 	/**
	* Setter function for the fullname property.
	*/
    public function setFullname($fullname){
		$this->_fullname = $fullname;
		return $this;
	}
	/**
	* Getter function for the fullname property.
	*/
    public function getFullname(){
		return $this->_fullname;
	}
  
 	/**
	* Setter function for the email property.
	*/
    public function setEmail($email){
		$this->_email = $email;
		return $this;
	}
	/**
	* Getter function for the email property.
	*/
    public function getEmail(){
		return $this->_email;
	}
 
 	/**
	* Setter function for the password property.
	*/
    public function setPassword($password){
		$this->_password = $password;
		return $this;
	}
	/**
	* Getter function for the password property.
	*/
    public function getPassword(){
		return $this->_password;
	}
  
 	/**
	* Setter function for the addTime property.
	*/
    public function setAddTime($ts){
		$this->_addTime = $ts;
		return $this;
	}
	/**
	* Getter function for the addTime property.
	*/
    public function getAddTime(){
		return $this->_addTime;
	}
 
 	/**
	* Setter function for the deleteTime property.
	*/
    public function setDeleteTime($ts){
		$this->_deleteTime = $ts;
		return $this;
	}
	/**
	* Getter function for the deleteTime property.
	*/
    public function getDeleteTime(){
		return $this->_deleteTime;
	}
 
 	/**
	* Setter function for the level property.
	*/
    public function setLevel($level){
		$this->_level = $level;
		return $this;
	}
	/**
	* Getter function for the level property.
	*/
    public function getLevel(){
		return $this->_level;
	}
  
 	/**
	* Setter function for the id property.
	*/
    public function setId($id){
		$this->_id = $id;
		return $this;
	}
	/**
	* Getter function for the id property.
	*/
    public function getId(){
		return $this->_id;
	}
}
 
